package com.rpc.protocol.http;

import com.rpc.framework.Invocation;
import com.rpc.framework.Protocol;
import com.rpc.framework.URL;

/**
 * http协议
 * @Author:cxy
 * @Date:2021/1/22 20:45
 */
public class HttpProtocol implements Protocol {

    @Override
    public void start(URL url) {
        new HttpServer().start(url);
    }

    @Override
    public String send(URL url, Invocation invocation) {
        return new HttpClient().send(url,invocation);
    }
}
